package de.hochschuletrier.bachelor.antfarm.util;

import java.awt.Point;

import de.hochschuletrier.bachelor.antfarm.entity.Entity;

public class DistanceHelper {
	public static float getDistance(Entity e1, Entity e2) {
		return getDistance(e1.getX(), e1.getY(), e2.getX(), e2.getY());
	}

	public static float getDistance(int x1, int y1, int x2, int y2) {
		Point p1 = new Point(x1,y1);
		Point p2 = new Point(x2,y2);
		
		return (float) p1.distance(p2);
	}
}
